﻿using Nop.Core.Domain.XJ;
using Nop.Web.Models.Home;
using System.Collections.Generic;

namespace Nop.Web.Models.XJ
{
	public class MaintenanceListModel
	{
	}
	public class MaintenanceListItemModel
	{
		public int Id { get; set; }
		/// <summary>
		/// 设施设备
		/// </summary>
		public string EquipmentName { get; set; }
		/// <summary>
		/// 维修人
		/// </summary>
		public string MaintenancePersonName { get; set; }
		/// <summary>
		/// 维修日期
		/// </summary>
		public string MaintenanceOn { get; set; }
		/// <summary>
		/// 维修备注
		/// </summary>
		public string MaintenanceComment { get; set; }
		/// <summary>
		/// 评分
		/// </summary>
		public int Star { get; set; }
		/// <summary>
		/// 状态
		/// <see cref="InspectionStateEnum"/>
		/// </summary>
		public string StateName { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public string CreatedOn { get; set; }
	}
	public class MaintenanceModel
	{
		public MaintenanceModel()
		{
			Pictures = new List<string>();
			Comments = new List<MaintenanceCommentViewModel>();
			StockOuts = new List<XJEquipmentStockOutTemp>();
			AvailableDeparts = new List<SelectItemModel>();
			AvailableTeams = new List<SelectItemModel>();
			AvailableUsers = new List<SelectItemModel>();
			AvailablePlaces = new List<SelectItemModel>();
			AvailableCategories = new List<SelectItemModel>();
		}
		public int Id { get; set; }
		/// <summary>
		/// 维修单号
		/// </summary>
		public string SNo { get; set; }
		/// <summary>
		/// 计划单号
		/// </summary>
		public string PNo { get; set; }
		/// <summary>
		/// 设施设备类别
		/// </summary>
		public int CategoryId { get; set; }
		public string CategoryName { get; set; }
		/// <summary>
		/// 巡检点
		/// </summary>
		public int PlaceId { get; set; }
		public string PlaceName { get; set; }
		/// <summary>
		/// 巡检计划Id
		/// </summary>
		public int InspectionPlanId { get; set; }
		/// <summary>
		/// 情况说明
		/// </summary>
		public string Comment { get; set; }
		/// <summary>
		/// 是由分管领导指派
		/// </summary>
		public bool IsAssign { get; set; }
		/// <summary>
		/// 指派说明
		/// </summary>
		public string AssignComment { get; set; }
		/// <summary>
		/// 是外援实施
		/// </summary>
		public bool IsExternal { get; set; }
		/// <summary>
		/// 维修费用
		/// </summary>
		public decimal Total { get; set; }
		/// <summary>
		/// 责任部门
		/// </summary>
		public int ResponsibleDepartmentId { get; set; }
		/// <summary>
		/// 责任部门
		/// </summary>
		public string ResponsibleDepartmentName { get; set; }
		/// <summary>
		/// 责任班组
		/// </summary>
		public int ResponsibleTeamId { get; set; }
		/// <summary>
		/// 责任班组
		/// </summary>
		public string ResponsibleTeamName { get; set; }
		/// <summary>
		/// 责任人
		/// </summary>
		public int ResponsiblePersonId { get; set; }
		/// <summary>
		/// 责任人
		/// </summary>
		public string ResponsiblePersonName { get; set; }
		/// <summary>
		/// 维修人(一或多人)
		/// <see cref="MaintenancePersons"/>
		/// </summary>
		public string MaintenancePersonNames { get; set; }
		/// <summary>
		/// 维修备注
		/// </summary>
		public string MaintenanceComment { get; set; }
		/// <summary>
		/// 维修日期
		/// </summary>
		public string MaintenanceOn { get; set; }
		/// <summary>
		/// 工时
		/// </summary>
		public int Hours { get; set; }
		public string HoursString { get; set; }
		/// <summary>
		/// 评分
		/// </summary>
		public int Star { get; set; }
		/// <summary>
		/// 评价
		/// </summary>
		public string Evaluation { get; set; }
		/// <summary>
		/// 评价时间
		/// </summary>
		public string EvaluationOn { get; set; }
		/// <summary>
		/// 状态
		/// <see cref="MaintenanceStateEnum"/>
		/// </summary>
		public int State { get; set; }
		public string StateName { get; set; }
		/// <summary>
		/// 创建人
		/// </summary>
		public int CustomerId { get; set; }
		public string CustomerName { get; set; }
		/// <summary>
		/// 部门
		/// </summary>
		public int DepartmentId { get; set; }
		public string DepartmentName { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public string CreatedOn { get; set; }
		/// <summary>
		/// 暂停
		/// </summary>
		public bool IsPause { get; set; }
		/// <summary>
		/// 图片
		/// </summary>
		public string SelectedPictureIds { get; set; }
		/// <summary>
		/// 巡检图片
		/// </summary>
		public IList<string> Pictures { get; set; }
		/// <summary>
		/// 可以确认
		/// </summary>
		public bool CanConfirm { get; set; }
		/// <summary>
		/// 可以指派
		/// </summary>
		public bool CanAssign { get; set; }
		/// <summary>
		/// 可以分配
		/// </summary>
		public bool CanAllocate { get; set; }
		/// <summary>
		/// 可以完工
		/// </summary>
		public bool CanComplete { get; set; }
		/// <summary>
		/// 可以评论
		/// </summary>
		public bool CanComment { get; set; }
		/// <summary>
		/// 汇报、评价
		/// </summary>
		public IList<MaintenanceCommentViewModel> Comments { get; set; }
		/// <summary>
		/// 领料申请
		/// </summary>
		public IList<XJEquipmentStockOutTemp> StockOuts { get; set; }
		/// <summary>
		/// 部门
		/// </summary>
		public IList<SelectItemModel> AvailableDeparts { get; set; }
		/// <summary>
		/// 班组
		/// </summary>
		public IList<SelectItemModel> AvailableTeams { get; set; }
		/// <summary>
		/// 人员
		/// </summary>
		public IList<SelectItemModel> AvailableUsers { get; set; }
		/// <summary>
		/// 巡检点
		/// </summary>
		public IList<SelectItemModel> AvailablePlaces { get; set; }
		/// <summary>
		/// 设备分类
		/// </summary>
		public IList<SelectItemModel> AvailableCategories { get; set; }
	}
}